perm filename PUPCL.C[11,HE] blob sn#688199 filedate 1982-12-06 generic text, type T, neo UTF8
/* LINTLIBRARY */
/*
 * pupclose.c
 *
 * Closes a pup channel.
 *
 * Jeffrey Mogul & Dan Kolkowitz	12-January-1981
 *
 */

#include <puppacket.h>
#include <pupstatus.h>

pupclose(Pchan)
struct	PupChan	*Pchan;
{	/* */
	if (Pchan->mystic != PC_MYSTIC)
	    return(PCNOTOPEN);	/* pup channel does not appear to be open */

#ifndef MC68000
	close(Pchan->ifid);
	close(Pchan->ofid);
#endif	MC68000

	return(OK);
}